I'm developing an emulator for an MMO and I have a question:
Load or not all account data(storage items, all character info, etc) when user log-in?
at the moment what I'm doing is loading only the required information:
on request login: load account data (storage items, gold, etc)
on send character list: load basic character info (equip items(only item/app id/refine), and infos that's displayed on the character screen).
on send to world: load all character info (inventory items, mail, friend list, equip items, skills etc).
the problem is that I think I'm running many queries to the database. ex:
on delete character: check character PIN, on error, update pin error count.
on create character: insert character info, basic items on db, send character list
on back to charlist: save all data of current online character, send character list
I'm using an asynchronous connection model for the clients. with many queries being executed at the same time the server will block.
would someone have a better way to do this?
Obs: I'm using boost::asio for the connection and mysql for the database.